<?php
namespace app\index\controller;


use think\Queue;
use app\index\service\WeChatService;
use app\index\model\MsgSystem as MsgSystemModel;
class Msgsystem extends Base
{
    public function get(){
    $user = new MsgSystemModel();
    $data=$this->request->param();
    $d=$user->with('Organization')
        ->where($data['field'],$data['op'],$data['value'])
        ->page(1)
        ->order('cTime desc')
        ->select();
    return $d;
    }
    public function update()
    {
        $data = $this->request->param();
        $res = new MsgSystemModel();
        return $res->updateModel($data);
    }
    public function delete(){
        $data = $this->request->param();
        $res = new MsgSystemModel();
        return $res->deleteModel($data);
    }
    public function save(){
        $res = new MsgSystemModel();
        $data = $this->request->param();
        $re = $res->saveModel($data);
        return $re;
    }
    public function scanNum(){
        $res = new MsgSystemModel();
        $data = $this->request->param();
        $res->where([$data['field']=>$data['value']])->setInc($data['field1']);
    }



}